program Pi;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
i, n, n0: integer;
x, y: real;

begin
  n:=0;
  n0:=0;
  for i:=1 to 1000000 do
  begin
    randomize;
    x:= 2*random;
    y:= 2*random;
    n:=n+1;
    if ((x-1)*(x-1)+(y-1)*(y-1) <= 1) then
      n0:=n0+1;
    writeln (4*n0/n:0:10);
  end;
  readln;
end.
 